package frameworks.base
{
	import Controller.ModuleController;

	public class BaseModule implements IModule
	{
		private var _view:IView;
		private var _options:Object;
		private var _moduleController:BaseModuleController;
		
		public function BaseModule(view:IView, options:Object)
		{
			_view = view;
			_options = options;
		}
		public function get view():IView
		{
			return _view;
		}
		public function get options():Object
		{
			return _options;
		}
		public function set moduleController(moduleController:BaseModuleController):void{
			_moduleController = moduleController;
		}
		public function callModuleController(sid:String, ...args):*{
			if(_moduleController!=null && _moduleController[sid] is Function){
				return _moduleController[sid].apply(null,args);
			}else{
				return void;
			}
		}
	}
}